package com.cazor.dg.service.impl;

import java.util.List;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.cazor.common.utils.DateUtils;
import javax.annotation.Resource;
import org.springframework.stereotype.Service;
import com.cazor.dg.mapper.DgDevDeviceInstanceMapper;
import com.cazor.dg.domain.DgDevDeviceInstance;
import com.cazor.dg.service.IDgDevDeviceInstanceService;

/**
 * 检监测内容Service业务层处理
 * 
 * @author cazor
 * @date 2023-11-25
 */
@Service
public class DgDevDeviceInstanceServiceImpl extends ServiceImpl<DgDevDeviceInstanceMapper, DgDevDeviceInstance> implements IDgDevDeviceInstanceService
{
    @Resource
    private DgDevDeviceInstanceMapper dgDevDeviceInstanceMapper;

    /**
     * 查询检监测内容
     * 
     * @param id 检监测内容主键
     * @return 检监测内容
     */
    @Override
    public DgDevDeviceInstance selectDgDevDeviceInstanceById(Long id)
    {
        return dgDevDeviceInstanceMapper.selectDgDevDeviceInstanceById(id);
    }

    /**
     * 查询检监测内容列表
     * 
     * @param dgDevDeviceInstance 检监测内容
     * @return 检监测内容
     */
    @Override
    public List<DgDevDeviceInstance> selectDgDevDeviceInstanceList(DgDevDeviceInstance dgDevDeviceInstance)
    {
        return dgDevDeviceInstanceMapper.selectDgDevDeviceInstanceList(dgDevDeviceInstance);
    }

    /**
     * 新增检监测内容
     * 
     * @param dgDevDeviceInstance 检监测内容
     * @return 结果
     */
    @Override
    public int insertDgDevDeviceInstance(DgDevDeviceInstance dgDevDeviceInstance)
    {
        dgDevDeviceInstance.setCreateTime(DateUtils.getNowDate());
        return dgDevDeviceInstanceMapper.insertDgDevDeviceInstance(dgDevDeviceInstance);
    }

    /**
     * 修改检监测内容
     * 
     * @param dgDevDeviceInstance 检监测内容
     * @return 结果
     */
    @Override
    public int updateDgDevDeviceInstance(DgDevDeviceInstance dgDevDeviceInstance)
    {
        dgDevDeviceInstance.setUpdateTime(DateUtils.getNowDate());
        return dgDevDeviceInstanceMapper.updateDgDevDeviceInstance(dgDevDeviceInstance);
    }

    /**
     * 批量删除检监测内容
     * 
     * @param ids 需要删除的检监测内容主键
     * @return 结果
     */
    @Override
    public int deleteDgDevDeviceInstanceByIds(Long[] ids)
    {
        return dgDevDeviceInstanceMapper.deleteDgDevDeviceInstanceByIds(ids);
    }

    /**
     * 删除检监测内容信息
     * 
     * @param id 检监测内容主键
     * @return 结果
     */
    @Override
    public int deleteDgDevDeviceInstanceById(Long id)
    {
        return dgDevDeviceInstanceMapper.deleteDgDevDeviceInstanceById(id);
    }
}
